package at.ac.univie.zsu.aguataplan.domain;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;

/**
 * @author gerry
 * 
 */
@Entity
public class PersonWeb extends Web {

	@ManyToOne
	private Person refPerson;

	// ----------------------------------------------------
	// CONSTRUCTOR
	// ----------------------------------------------------

	public PersonWeb() {

	}

	// ----------------------------------------------------
	// METHODS
	// ----------------------------------------------------

	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("Address: ").append(getAddress()).append(", ");
		sb.append("Id: ").append(getId()).append(", ");
		sb.append("RefPerson: ").append(getRefPerson()).append(", ");
		sb.append("Version: ").append(getVersion());
		return sb.toString();
	}

	// ----------------------------------------------------
	// GETTER & SETTER
	// ----------------------------------------------------

	public Person getRefPerson() {
		return refPerson;
	}

	public void setRefPerson(Person refPerson) {
		this.refPerson = refPerson;
	}

}
